package day10test01;

import java.util.ArrayList;
import java.util.List;

public class test04 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("abc");
        list.add("bcd");
        int a = 0;
        int b = 0;
        int c = 0;
        int d = 0;

        for (int i = 0; i < list.size(); i++) {
            char[] chars = list.get(i).toCharArray();
            for (int i1 = 0; i1 < chars.length; i1++) {
                if (chars[i1] == 'a') {
                    a++;
                }
                if (chars[i1] == 'b') {
                    b++;
                }
                if (chars[i1] == 'c') {
                    c++;
                }
                if (chars[i1] == 'd') {
                    d++;
                }
            }
        }

        System.out.println("a=" + a + "  b=" + b + "  c=" + c + "  d=" + d);


    }
}
